package components 
{
	import flash.display.MovieClip;
	import flash.events.EventDispatcher;
	
	/**
	 * 组件基类
	 * ...
	 * @author firechen
	 * @version	1.0
	 */
	public class Component extends EventDispatcher 
	{
		//组件id
		public var id:int = -1;
		//皮肤视图
		public var view:MovieClip = null;
		
		public function Component(view:MovieClip) 
		{
			this.view = view;
			view.gotoAndStop(1);
			draw();
			clear();
			render();
		}
		
		/**
		 * 初始化
		 */
		protected function draw():void { }
		
		/**
		 * 渲染
		 */
		protected function render():void { }
		
		/**
		 * resize
		 * @param	width
		 * @param	height
		 */
		public function resize(width:Number, height:Number):void { }
		
		/**
		 * 清理
		 */
		public function clear():void { }
		
	}

}